import { data } from 'browserslist';
import http from '../utils/request';
import Cookie from "js-cookie"

// 登录
export function Login(params){
    return http({
        url: '/backstage/pc/login',
        method: 'post',
        params:{username:params.username, password:params.password}
    })
}
// 退出
export function Exit(params){
    return http({
        url: '/backstage/logout',
        method: 'get',
        params:{access_token:Cookie.get("token")}
    })
}
// 添加用户
export function add(data){
    return http({
        url: '/backstage/authority/usermanage',
        method: 'post',
        data:data,

    })
}
export default {Login,Exit,add};
